package code14JDBC;

/**
 * @author 黄衡熙
 * @version 1.0
 * 创建一张学生表,拥有以下字段:主键id、学号no唯一且不为空、姓名不为空、年龄
 */
public class Student {
    private Integer id;
    private String no;
    private String username;
    private Integer age;

    public Student() {
    }

    public Student(String username, Integer age) {
        this.username = username;
        this.age = age;
    }

    public Student(String no, String username, Integer age) {
        this.no = no;
        this.username = username;
        this.age = age;
    }

    @Override
    public String toString() {
        return "Student{" +
                "id=" + id +
                ", no='" + no + '\'' +
                ", username='" + username + '\'' +
                ", age=" + age +
                '}';
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getNo() {
        return no;
    }

    public void setNo(String no) {
        this.no = no;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }
}
